package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallGoodsSpecificSku;
import com.appkubes.mall.core.po.MallGoodsSpecificSkuExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallGoodsSpecificSkuMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="countByExample")
    long countByExample(MallGoodsSpecificSkuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallGoodsSpecificSkuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_goods_specific_sku",
        "where specific_sku_key = #{specificSkuKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String specificSkuKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_goods_specific_sku (specific_sku_key, app_key, ",
        "goods_key, sku_code, ",
        "sku_pic, sku_price, ",
        "sku_stock, sku_weight, ",
        "sku_dims, sku_original_price, ",
        "is_default, version)",
        "values (#{specificSkuKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{goodsKey,jdbcType=VARCHAR}, #{skuCode,jdbcType=VARCHAR}, ",
        "#{skuPic,jdbcType=VARCHAR}, #{skuPrice,jdbcType=DECIMAL}, ",
        "#{skuStock,jdbcType=INTEGER}, #{skuWeight,jdbcType=DOUBLE}, ",
        "#{skuDims,jdbcType=VARCHAR}, #{skuOriginalPrice,jdbcType=DECIMAL}, ",
        "#{isDefault,jdbcType=TINYINT}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallGoodsSpecificSku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="insertSelective")
    int insertSelective(MallGoodsSpecificSku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_sku_key", property="specificSkuKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_code", property="skuCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_pic", property="skuPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_price", property="skuPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sku_stock", property="skuStock", jdbcType=JdbcType.INTEGER),
        @Result(column="sku_weight", property="skuWeight", jdbcType=JdbcType.DOUBLE),
        @Result(column="sku_dims", property="skuDims", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_original_price", property="skuOriginalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsSpecificSku> selectByExampleWithRowbounds(MallGoodsSpecificSkuExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_sku_key", property="specificSkuKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_code", property="skuCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_pic", property="skuPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_price", property="skuPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sku_stock", property="skuStock", jdbcType=JdbcType.INTEGER),
        @Result(column="sku_weight", property="skuWeight", jdbcType=JdbcType.DOUBLE),
        @Result(column="sku_dims", property="skuDims", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_original_price", property="skuOriginalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsSpecificSku> selectByExample(MallGoodsSpecificSkuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "specific_sku_key, app_key, goods_key, sku_code, sku_pic, sku_price, sku_stock, ",
        "sku_weight, sku_dims, sku_original_price, is_default, version",
        "from mall_goods_specific_sku",
        "where specific_sku_key = #{specificSkuKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="specific_sku_key", property="specificSkuKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_code", property="skuCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_pic", property="skuPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_price", property="skuPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sku_stock", property="skuStock", jdbcType=JdbcType.INTEGER),
        @Result(column="sku_weight", property="skuWeight", jdbcType=JdbcType.DOUBLE),
        @Result(column="sku_dims", property="skuDims", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_original_price", property="skuOriginalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="is_default", property="isDefault", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallGoodsSpecificSku selectByPrimaryKey(String specificSkuKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallGoodsSpecificSku record, @Param("example") MallGoodsSpecificSkuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallGoodsSpecificSku record, @Param("example") MallGoodsSpecificSkuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsSpecificSkuSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallGoodsSpecificSku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_specific_sku
     *
     * @mbg.generated
     */
    @Update({
        "update mall_goods_specific_sku",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "goods_key = #{goodsKey,jdbcType=VARCHAR},",
          "sku_code = #{skuCode,jdbcType=VARCHAR},",
          "sku_pic = #{skuPic,jdbcType=VARCHAR},",
          "sku_price = #{skuPrice,jdbcType=DECIMAL},",
          "sku_stock = #{skuStock,jdbcType=INTEGER},",
          "sku_weight = #{skuWeight,jdbcType=DOUBLE},",
          "sku_dims = #{skuDims,jdbcType=VARCHAR},",
          "sku_original_price = #{skuOriginalPrice,jdbcType=DECIMAL},",
          "is_default = #{isDefault,jdbcType=TINYINT},",
          "version = #{version,jdbcType=INTEGER}",
        "where specific_sku_key = #{specificSkuKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallGoodsSpecificSku record);
}